<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Button click</title>
		<script type="text/javascript">
			function showNamesAndDate() {
				var firstName = document.getElementById('firstName').value;
				var secondName = document.getElementById('secondName').value;
				
				var currentTime = new Date();
				var date = currentTime.getHours() + ':' + currentTime.getMinutes() + ':' + currentTime.getSeconds();
				alert(firstName + " " + secondName +  " " + date);
			}
		</script>
	</head>
	<body>
		First Name: <input type="text" id="firstName"><br>
		Second Name: <input type="text" id="secondName"><br>
		<button onClick="showNamesAndDate()">Click Me</button>
	</body>
</html>